package com.nxn.dinner.model;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.nxn.core.model.Customer;
import com.nxn.core.model.IdEntity;
import com.nxn.core.model.User;

@Entity
@Table(name = "t_dish_evaluate")
public class DishEvaluate extends IdEntity {

	private Customer customer;
	private String content;
	private Dish dish;
	private Timestamp evaluateTime;
	private boolean enable;
	private Timestamp editTime;
	private User editor;
	
	@ManyToOne(cascade={CascadeType.MERGE})
	public Customer getCustomer() {
		return customer;
	}
	@Column(name = "content")
	public String getContent() {
		return content;
	}
	@ManyToOne(cascade={CascadeType.MERGE})
	public Dish getDish() {
		return dish;
	}
	@Column(name = "evaluateTime")
	public Timestamp getEvaluateTime() {
		return evaluateTime;
	}
	@Column(name = "enable")
	public boolean getEnable() {
		return enable;
	}
	@Column(name = "editTime")
	public Timestamp getEditTime() {
		return editTime;
	}
	@ManyToOne(cascade={CascadeType.MERGE})
	public User getEditor() {
		return editor;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public void setDish(Dish dish) {
		this.dish = dish;
	}
	public void setEvaluateTime(Timestamp evaluateTime) {
		this.evaluateTime = evaluateTime;
	}
	public void setEnable(boolean enable) {
		this.enable = enable;
	}
	public void setEditTime(Timestamp editTime) {
		this.editTime = editTime;
	}
	public void setEditor(User editor) {
		this.editor = editor;
	}
	
}
